package com.share.design.template;

/**
 * author:caifan
 * date:2020/2/5
 */
public class TemplateClient {

    public static void main(String[] args) {
        Calculator add = new Add();
        Integer sum1 = add.getResult("3 +  5", Operate.Plus.getDesc());

        Calculator multiplyTotal = new Multi();
        Integer total = multiplyTotal.getResult("3 * 5  * 1", Operate.Multiply.getDesc());

        System.out.println(sum1 + ":" + total);
    }
}
